package com.example.travel.mapper;

import com.example.travel.domain.Messages;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author li134
* @description 针对表【messages】的数据库操作Mapper
* @createDate 2025-03-17 12:17:50
* @Entity com.example.travel.domain.Messages
*/
public interface MessagesMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Messages record);

    int insertSelective(Messages record);

    Messages selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Messages record);

    int updateByPrimaryKey(Messages record);

    void saveMessage(@Param("fromUser") String fromUser, @Param("toUser") String toUser, @Param("messageContent") String messageContent);

    List<Messages> getOfflineMessages(String toUser);

    void markMessageAsRead(@Param("messageId") int messageId);
}
